﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ShapeExer
{
    internal class Square:IShape
    {
        double x;//边长
        double area;

        public Square(double x)//构造方法
        {
            this.x = x;
        }
        public double Area
        {
            get
            {
                return x * x;
            }
            set
            {
                area = value;
            }
        }
        public bool isArealegal()
        {
            if (Area > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
    }
}
